#!/usr/bin/python
# -*- encoding: utf-8 -*-
'''
@File    :   1.py
@Time    :   2020/03/15 21:09:17
@Author  :   Malygos_l 
@Version :   1.0
@Contact :   751756061@qq.com
@WebSite :   www.gitee.com/malygos_l
'''
# Start typing your code from here
# 写函数，判断用户传入的对象（字符串、列表、元组）长度,并返回给调用者。

def length(object):
    return len(object)

str = "[1,2]"
tuple = tuple([1,2])
list = [1,2]

print(length(str))
print(length(tuple))
print(length(list))